<template>
  <div>
    <!-- 1:数量显示2：数量修改 3：限制最大值与最小值 -->
    <DrNum :num="num" @setNum="setNum" :min="1" :max="15"></DrNum>
  </div>
</template>
<script>
import DrNum from '@/components/DrNum.vue'
export default {
  components: { DrNum },
  data () {
    return {
      num: 10
    }
  },
  methods: {
    setNum (step) {
      this.num += step
    }
  }
}
</script>
<style></style>
